home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 5
/
005.d81
/
left_right game
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
5KB
|
168 lines
1000 printchr$(142);"[147][158]";
1010 poke53281,9:poke53280,12
1020 print" [157] [157] [157] [157] [146] [145][157] [145][157] [145][157] [145][157] ";
1030 print"[157][157][157] [157][157][157] [146] [145][157] [145][157] [145][157] [145][157] [157][157][157] ";
1040 print"[145][145] [157][157][157] [157] [157] [157] ";
1050 print" [145] [145] [145] [145] "
1060 print" [157][157][157] [157] [157] [157] [145][145] [145][157] [145][157] [157][157][146][223][223][157][146][223][223]";
1070 print" [145][157] [145][157] [145][157] [145][157] [145][157]";
1080 print" [157][157] [157] [157][157][157][157][157] [145][157][157][157][157] [145][157] [145][157] [145][157] [145][157]";
1090 print" [157] [157] [157] [157] [145][145] [145][145][157] [157] [157] [157] [157] ";
1100 print"[145][145][157][145][145] [157][157][157] [157] [157] [157] ";
1105 print:print:print"";
1110 print" [157][157] [157] [157][157][157][157][157] [145][157][157][157][157] [145][157] [145][157] [145][157] [145][157]";
1120 print"";
1130 print" [145][157] [145][157] [145][157] [145][157] [157] [157] [157] [157] [145][145][157][157][157][157] ";
1140 print"";
1150 print" [145][157] [145][157] [145][157] [145][157] [157] [157] [157] [157] [157][157][157][145][145][145][145] [157] [157] ";
1160 print"";
1170 print" [145][157] [145][157] [145][157] [145][157] ";
1180 print"[157][157][157] [157][157][157] [146]";
1200 print:print:print"[129] inspired by a game by truck smith."
1210 print" completely revamped by jimmy w."
1300 poke198,0:wait198,1:getk$:poke53281,11:poke53280,14
1301 print"[147]"
1400 print"[147] [212]he rules of [158]left/right game are"
1410 print:print"deceptively simple: [211]elect keys on the"
1420 print:print"keyboard for your left and right hands."
1430 print:print"[212]hen, at the tone, if the small block"
1440 print:print"on the screen has a black background,"
1450 print:print"press the key corresponding to the side"
1460 print:print"of the screen whose color bar matches"
1470 print:print"the color of the block."
1480 print:print:print" [208]ress space bar":poke198,0:wait198,1:getk$
1500 print"[147] [201]f the background around the small"
1510 print:print"block is grey, then press the key"
1520 print:print"corresponding to the color bar that"
1530 print:print"doesn't match the color of the small"
1540 print:print"block."
1550 print:print" [217]ou get one second to decide which"
1551 print:print"key to press, then the clock starts to"
1552 print:print"count up. [201]f it reaches 10 seconds,"
1553 print:print"you lose. [201]f you ever press the wrong"
1554 print:print"key, you lose."
1560 print:print:print" [208]ress space bar":poke198,0:wait198,1:getk$
1600 print"[147] [208]ress a key with your [158]left hand."
1610 poke198,0:wait198,1:getkey$(0)
1620 print"[147] [208]ress a key with your right hand."
1630 poke198,0:wait198,1:getkey$(1)
1631 ifkey$(0)<>key$(1)then1640
1632 gosub5900:print"[147][200]ey! [196]eadbrain![160][160][217]ou pressed the same"
1634 print:print"key for both hands! [215]ant to try again?"
1635 forc9=1to2444:next
1636 gosub5900
1638 goto1600
1640 print".........here goes....."
1650 forcc=1to500:next
2000 print"[147]"
2100 poke53281,14
2200 poke53280,7
2300 dimc$(16)
2400 ti$="000000":ts$=ti$
2600 gosub11300:reminit position array
2700 gosub11900:reminit colors
2800 forcx=1to4096
2900 lc=int(rnd(ti)*8+1):poke53280,lc+rnd(ti)*2:right%=rnd(ti)*2
3000 forc9=1to4:bk%(c9)=rnd(ti)*2:next
3100 bl=int(rnd(ti)*9)+1
3200 ifbl=5thenforc9=2to4:bk%(c9)=bk%(1):next
3300 ifbl=2thenbk%(1)=bk%(3)
3400 ifbl=4thenbk%(1)=bk%(2)
3500 ifbl=6thenbk%(3)=bk%(4)
3600 ifbl=8thenbk%(2)=bk%(4)
3700 gosub9200:gosub10300:gosub4500
3800 gosub5700:remscore
3900 gosub5900:remsound
4000 gosub5100:remtime
4100 gosub6600:remright/wrong
4200 nextcx
4300 goto12500
4400 rem"draw bars"
4500 printc$(lc+(right%=1));
4600 print"";spc(3);" ";
4700 printc$(lc+1+(right%=1));
4800 print"";spc(23);" ";
4900 return
5000 remkeywait & countdown
5100 ti$=ts$:k$=""
5200 getk$:ifk$=key$(0)ork$=key$(1)then5600
5300 gosub8000
5400 goto5200
5500 ifk$<>" "then5100
5600 ts$=ti$:return
5700 print"[146][211]core: ";sc;
5800 return:remfrom scoreprint
5900 rem start of round sound
6000 poke54296,0:poke54296,15
6100 poke54273,2:poke54272,44
6200 poke54277,7:poke54278,249
6300 poke54275,0:poke54276,33
6400 poke54276,32
6500 return
6600 ifright%=0thenifk$<>key$(bk%(bl%(bl)))then7000
6700 ifright%=1thenifk$=key$(bk%(bl%(bl)))then7000
6800 sc=sc+1
6900 return
7000 print"[147] [217]ou loose joweled turkey!"
7100 print:print"[217]ou don't even know your left from your"
7200 print:print"right!.... [217]our final score was a"
7300 print:print"mere "sc" out of a possible (to"
7400 print:print"anyone with the brains of a gnat) score"
7500 print:print"of 4096."
7600 print"............ [217]ou want to play again?"
7700 poke198,0:wait198,1:getk$
7800 ifk$<>"y"then12400
7900 run
8000 print"[146]"spc(22)"[212]ime used: "val(ti$);
8100 ifti$>"000010"then8300
8200 return:remfrom time print
8300 print"[147][217]ou deadbrained poke!"
8400 print:print"[217]our ten seconds of indecision have"
8500 print:print"cost you dearly. [217]our final score is"
8600 print:print"a mere "sc" points out of a possible"
8700 print:print"4096."
8800 print:print" [196]o you want to give your brain a rest?"
8900 poke198,0:wait198,1:getk$
9000 ifk$="y"then12400
9100 run
9200 forc9=217to242:pokec9,peek(c9)or128:next
9300 print"";:forc=1to11:printspc(20);bg$(bk%(3));" ";
9400 next
9500 print"";
9600 forc=1to11:printspc(20);bg$(bk%(4));" ";:next
9700 forc9=217to242:pokec9,peek(c9)or128:next
9800 print"";:forc=1to11:printbg$(bk%(1));" ":next
9900 print"";
10000 forc=1to11:printbg$(bk%(2));" ":next
10100 forc9=217to242:pokec9,peek(c9)or128:next
10200 return
10300 remdraw box
10400 gosub10100
10500 printc$(lc+lr);
10600 d$=""
10700 print"";left$(d$,po%(1,bl));
10800 gosub10100
10900 fori=0to6
11000 printspc(po%(0,bl))" "
11100 nexti
11200 return
11300 forc9=1to9:readpo%(0,c9):readpo%(1,c9):next
11400 data5,2,15,2,25,2,5,7,15,7,25,7,5,12,15,12,25,12:remhoriz/vert block pos'n
11500 bl%(1)=1:bl%(2)=1:bl%(3)=3
11600 bl%(4)=1:bl%(5)=1:bl%(6)=3
11700 bl%(7)=2:bl%(8)=2:bl%(9)=4
11800 return
11900 remcolor initialization
12000 c$="[159][158][156][129][149][152][150]"
12100 forc9=0to15:c$(c9)=mid$(c$,c9+1,1):next
12200 bg$(0)="[144]":bg$(1)="[155]"
12300 return
12400 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
12405 poke631,13:poke632,13:poke198,2:end
12500 print"[147] [217]ou clod! [196]o you realize you have"
12600 print:print"over an hour of your precious time to"
12700 print:print"win this stupid game!?!?!"
12800 poke198,0:wait198,1:getk$
12900 ifk$<>"y"thenrun
13000 goto12400